import axios from 'axios'

import { baseUrl, timeOut } from './config'

const request = axios.create({
  baseURL: baseUrl,
  timeout: timeOut
})

request.interceptors.request.use(config => {
  return config
}, err => {
  console.log(err)
})

request.interceptors.response.use(response => {
  return response.data
}, err => {
  return new Promise()
})

export default request




